package com.csweimei.rentmanagementtreasure.http.entity;

import android.view.View;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

public class MessageListBean extends BaseResult{
    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO implements Serializable {
        @SerializedName("messageID")
        private int messageID;
        @SerializedName("messageSta")
        private String messageSta;
        @SerializedName("messageText")
        private String messageText;
        @SerializedName("messageTime")
        private String messageTime;
        @SerializedName("code")
        private String codeX;

        public int show1(){
            if (messageSta.equals("系统消息")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }

        public int show2(){
            if (messageSta.equals("留言消息")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }

        public int show3(){
            if (messageSta.equals("客户消息")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }

        public int show4(){
            if (messageSta.equals("平台消息")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }

        public int show5(){
            if (messageSta.equals("财务消息")){
                return View.VISIBLE;
            }else {
                return View.GONE;
            }
        }


        public int getMessageID() {
            return messageID;
        }

        public void setMessageID(int messageID) {
            this.messageID = messageID;
        }

        public String getMessageSta() {
            return messageSta;
        }

        public void setMessageSta(String messageSta) {
            this.messageSta = messageSta;
        }

        public String getMessageText() {
            return messageText;
        }

        public void setMessageText(String messageText) {
            this.messageText = messageText;
        }

        public String getMessageTime() {
            return ValidateUtils.getTimeByType(messageTime,ValidateUtils.TIME_YMDHM);
        }

        public void setMessageTime(String messageTime) {
            this.messageTime = messageTime;
        }

        public String getCodeX() {
            return codeX;
        }

        public void setCodeX(String codeX) {
            this.codeX = codeX;
        }
    }
}
